package com.yckj.day03;

/**
 * TODO 使用for循环对1+2+3+...+100进行求和
 *
 * @author shengyuee
 * @version 1.0
 * 2025/7/18 11:41
 */
public class ForDemo1 {
    public static void main(String[] args) {
        int sum = 0;
        for( int i = 1;i <= 100;i++){
            sum = sum + i;
        }
        System.out.println("sum = " + sum);
    }
}
